package com.funlog.designpattern.composite.demo01;

public class Client {
    public static void main(String[] args) {
        Composite root = new Composite();
        Component leaf1 = new Leaf("left leaf");
        Component leaf2 = new Leaf("right leaf");

        root.add(leaf1);
        root.add(leaf2);

        root.operation();  // 统一调用
    }
}
